package cmo.neutech.day09.Cola;

import cmo.neutech.day09.Cola.ColaRmployee;

public class HourlyEmployee extends ColaRmployee {
    int hourSal;
    int hourMonth;

    public HourlyEmployee(String name, int month, int hourSal, int hourMonth) {
        super(name, month);
        this.hourSal = hourSal;
        this.hourMonth = hourMonth;
    }

   public int getSalary(int month){
        int sal = 0;
        if(hourMonth > 160){
            sal = (hourMonth-160)*hourSal+160*hourSal;
        }else {
            sal = hourMonth*hourSal;
        }
        return super.getSalary(month) + sal;
   }
}
